import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { TypeOrmModule } from '@nestjs/typeorm';
import { PlayConfigModule } from './play_config/play_config.module';

@Module({
  imports: [  
    TypeOrmModule.forRoot({
      type: 'mysql',
      host: 'localhost',
      port: 3306,
      username: 'caoyt',
      password: '!QAZ2wsx3edc',
      database: 'play',
      entities: [__dirname + '/**/*.entity{.ts,.js}'],
      synchronize: true,
    }), 
    PlayConfigModule,
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}
